#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>

using namespace std;




class Solution {
public:
    bool isPalindrome(string s) {
        string s1;
        string s2;

        for (char ch : s)
        {
            if (ch < 'a' || ch>'z')
            {
                ch += 32;
            }
            s1 += ch;
        }
        for (char ch : s1)
        {
            if (ch >= 'a' && ch <= 'z')
            {
                s2 += ch;
            }
        }

        string s3;

        for (auto ch = s2.rbegin(); ch != s2.rend(); ++ch)
        {
            s3 += *ch;
        }
        int judge = s2.compare(s3);
        if (judge == 0)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
};

int main() {
    /*string s1;
    getline(cin, s1);
    int pos = s1.find_last_of(' ');
    string s2;
    s2 = s1.substr(pos + 1);
    int num = s2.size();
    cout << num;*/

    Solution s1;
    s1.isPalindrome("0P");

    return 0;
}